<include file="Public:header"/>

<div class="table-tit"><a href="{:U('Dash/salecode')}">销售码列表</a>&nbsp;>>&nbsp;{$info.dis_isbn}</div>

<div class="dl-panel">
    <div class="row">
        <div class="col-md-2">
            <div class="bord-blue-1 bill">{$all_count}单</div>
        </div>
        <div class="col-md-2">
            <div class="bord-red-4 bill">￥{$all_gold|default=0}</div>
        </div>
        <div class="col-md-8">
            <dl class="dl-horizontal marginbottom0">
                <dt>优惠方案</dt>
                <dd>{$info.dis_preid|getPreName=$info['dis_preid'],###}</dd>
                <dt>使用时间</dt>
                <dd>20{$info.dis_timecode}</dd>
                <dt>截止时间</dt>
                <dd>20{$info.dis_endtimecode}</dd>
                <dt>推广员</dt>
                <dd>{$info.dis_ssaid|getStaffName=$info['dis_ssaid'],###}</dd>
            </dl>
        </div>
    </div>
</div>

<div class="table-tit">使用记录</div>
<div class="info-panel" id="main">&nbsp;</div>

<div class="table-tit">订单历史</div>
<table class="table table-bgfont">
    <tr>
        <th>ID</th>
        <th width="22%">订单编号</th>
        <th>分成金额</th>
        <th>月份</th>
        <th>订单状态</th>
    </tr>

    <volist name="list.data" id="v">
        <tr>
            <td>{$v.c_id}</td>
            <td>{$v.c_ordsn}</td>
            <td>{$v.c_in}</td>
            <td>{$v.c_month}月</td>
            <td><if condition="$v.c_status eq 1">处理中<else/>已清算</if></td>
        </tr>
    </volist>
    <tr>
        <td colspan="5">{$list.page}</td>
    </tr>
</table>


<script src="__PUBLIC__/libs/echarts/echarts.js"></script>
<script>
    var menus = {$menus};
            var nums = {$nums};
    require.config({
        paths: {
            echarts: '__PUBLIC__/libs/echarts'
        }
    });
    require(
            [
                'echarts',
                'echarts/chart/bar',
                'echarts/chart/line'
            ],
            function (ec) {
                // 基于准备好的dom，初始化echarts图表
                var myChart = ec.init(document.getElementById('main'));

                option = {
                    title: {text: '销售码有效期内浏览次数'},
                    tooltip: {trigger: 'axis'},
                    legend: {data: ['浏览次数']},
                    toolbox: {
                        show: true,
                        feature: {
                            dataView: {show: true, readOnly: false},
                            magicType: {show: true, type: ['line', 'bar']},
                            restore: {show: true},
                            saveAsImage: {show: true}
                        }
                    },
                    calculable: true,
                    xAxis: [
                        {
                            type: 'category',
                            data: menus
                        }
                    ],
                    yAxis: [{type: 'value'}],
                    series: [
                        {
                            name: '浏览次数',
                            type: 'bar',
                            data: nums
                        }
                    ]
                };
                // 为echarts对象加载数据 
                myChart.setOption(option);
            }
    );
</script>
<include file="Public:footer"/>